import { useState } from 'react';
import { Form, Switch, Radio } from 'antd';
import CommonModal from "@/components/CommonModal";

export default ({ visible, handleOk, handleCancel }) => {

  const [form] = Form.useForm();

  const [open, setOpen] = useState(true);

  return (<CommonModal
    visible={visible}
    title='批量设置'
    width='480px'
    minHeight="140px"
    onOk={()=>handleOk(open)}
    onCancel={handleCancel}
  >
    <Form
      form={form}
      name='print-set-push-modal'
    >
      {/* 统一添加范围 */}
      {/* <Form.Item label="修改范围" name='range' rules={[{ required: true, message: '请选择' }]}>
          <Radio.Group>
            <Radio value="apple">针对勾选项</Radio>
            <Radio value="pear">针对筛选项</Radio>
          </Radio.Group>
        </Form.Item> */}
      <Form.Item
        name="switch"
        label="批量设置推送打印"
        rules={[{ required: true }]}
        extra="将对所有勾选的门店进行覆盖式更改"
      >
        <Switch size="default" checked={open} unCheckedChildren="关闭" checkedChildren="开启" onChange={e=>setOpen(e)}/>
      </Form.Item>
    </Form>
  </CommonModal>)
}